<%@page import="vo.Item"%>
<%@page import="java.util.ArrayList"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%
	ArrayList<Item> list = (ArrayList<Item>)request.getAttribute("list");
	int num = 1;
	
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body>
<h1 align="center">Fruit Total List</h1><p>
<table align="center">
<%
	if(list != null){
%>
	<tr>
<%
	for(int i=0; i<list.size(); i++){
		Item item = list.get(i);
%>
	<td>
		<a href="itemView.do?itemnumber=<%= item.getItemnumber() %>">
		<img src="<%= item.getUrl()%>" height="150"width="150" border=1></a><br>
		상품명 :<%= item.getName() %><br>
		가격 :<%= item.getPrice() %>원
	</td>
<%
	if(i==0 || i%6 !=0){
		continue;
	}else{
%>
</tr><tr>
<%
	} 
}
%>
</tr>
<%
	}
%>
</table><br><br>

<!-- 3) 이부분은 오늘본 상품을 보여주는 view -->
<h2 align="center"><b>오늘본 상품</b></h2>
<table align="center" width="600" bgcolor="lightGray">
	<tr>
		<%
			ArrayList<String> images = 
			(ArrayList<String>)request.getAttribute("images");
		if(images != null && images.size()>0){
			for(int i=0; i<images.size(); i++){
		%>
		<td align="center">
			<img alt="" src="<%= images.get(i)%>" width="100" height="100">
		</td>
		<%
			}
		}
		%>
	</tr>
</table>
</body>
</html>















